package com.lxinet.jeesns.modules.wechat.dao;

import com.lxinet.jeesns.core.dao.IBaseDao;
import com.lxinet.jeesns.core.entity.Page;
import com.lxinet.jeesns.modules.wechat.entity.WechatRecord;
import com.lxinet.jeesns.modules.wechat.entity.RowMsg;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by lzs on 2017/4/9.
 */
public interface IWechatRecordDao extends IBaseDao<WechatRecord> {
    /**
     * 通过wxuid username 获取记录
     * @param  wxuin
     * @param  username
     * @return
     */
    List<WechatRecord> findRecords(@Param("wxuin") String wxuin, @Param("username") String username);


    List<WechatRecord> findZDMsg(@Param("formusername") String formusername, @Param("tousername") String tousername);


    WechatRecord findByCondition(@Param("formusername") String formusername, @Param("tousername")String tousername, @Param("msgid") String msgid);

    int count(@Param("tousername")String tousername);

    int getCountByNickName(@Param("nickname")String nickname);

    List<RowMsg> Conditioncount(@Param("tousername")String tousername);

    void changeFlag(@Param("id")Integer id);

    List<WechatRecord> findOldMsgByPage(@Param("page") Page page,@Param("formusername") String formusername,@Param("tousername") String tousername);

}
